/**************************************************************************
 * @doc CPAC
 * @module CPACEXTN.H |  
 * Include file for the CPAC data file and functions.
 *
 * Product         :   SoftPay 2000 (Global Payment Methodology).
 * <nl>Developer   :   Vipin_K1
 * <nl>Notes       :
 *
 * @head3 CPAC Functions |
 * @index | CPAC
 * @end
 *
 * Copyright (c) 1996-2000 by VeriFone Inc. All rights reserved.
 * 
 * No part of this software may be used, stored, compiled, reproduced,
 * modified, transcribed, translated, transmitted, or transferred, in any form 
 * or by any means whether electronic, mechanical, magnetic, optical, 
 * or otherwise, without the express prior written permission of VeriFone, Inc.
 *
 * Revision History
 * ------------------------------------------------------------------------
$Log: /SoftPay/SPK2SIM/Source/CPACSrc/CPACEXTN.h $
 * 
 * ------------------------------------------------------------------------
 ********************************************************************************/
#ifndef CPACEXTN_H
#define CPACEXTN_H

// CPAC_LINT_ADDED
extern int inGetTCTTrackNumber(void);
extern short inGetTipProcessing(void);
///extern HOST_8583_DATA *psrCreateHostData(void);
extern void vdFreeVariantTables(void);
extern int inGetCDTHostIndex(void);
extern void vdGetReversalFileName(char*,int);
extern short inGetPerOver(void);
extern VS_BOOL fComputeOverage(TRANSACTION_OBJECT*);
extern long lnGetBatchNum(void);
extern long lnGetInvNum(void);
// extern int inGetHostHandle(void);
extern int inGetHostTotals(TRANSACTION_OBJECT*,ACCUM_REC  * /*, int*/);
extern short inGetNumAdv(void);
extern short shGetHostGroupRef(void);
//extern void vdOverLoadLoadDataFuncs (ISOLOAD srNewLoadDataFuncs[]);
extern int inGetManualApproval(char* pchAuthCode,int inAuthCodeSize);
extern long lnGetSTAN(void);
extern int inIncInvNum(void);
extern short inGetPrinterType(void);
extern VS_BOOL fGetEnablePrinter(void);
extern VS_BOOL fGetOpenTabOptRec(void);
extern short inGetClerkMode(void);
extern short inGetBatchNumSize(void);
extern char* szGetSrvENum(void);
extern int inGetHDTTotRecs(void);
extern int inGetTCTShiftType(void);
extern short inGetApplicationType(void);
extern void vdFreeVariantTables(void);
///extern HOST_8583_DATA *psrCreateHostData(void);
extern int inGetHostTranCnt(TRANSACTION_OBJECT* pobTran);
extern int inLoadNextBatchRec(TRANSACTION_OBJECT* pobTran,long lnDBWhat);
extern VS_BOOL fChkAllHostBatches(TRANSACTION_OBJECT* pobTran);
extern VS_BOOL fGetAutoSettle(void);
extern int inResetBatch(TRANSACTION_OBJECT* pobTran);
extern short inGetAutoSettRetries(void);
extern TRANSACTION_OBJECT* pstGetSet_pobTran(TRANSACTION_OBJECT* pstTranObject,int inMode,int* pinResult);
extern int pSettleAllHosts(TRANSACTION_OBJECT* pobTran);
extern VS_BOOL fGetDemoMode(void);
extern VS_BOOL fGetPCTPrintMerchCopy(void);
extern void vdDisplayTranTitle(long lnTitle);
extern int inDecOfflineCount(void);
extern int inWriteBatchData(DB_FILE* psrDBF,BATCH_KEY* psrBKey,BATCH_REC* psrBRec,long lnRecNum);
extern int inCloseBatch(DB_FILE* psrDBFPtr);
extern int inCPACNewUploadAdvices(VS_BOOL fSettle,TRANSACTION_OBJECT* pobTran,int inISOSendSize,VS_BOOL fReversalFlag);
extern void vdDisplayErrorString(const char* szErrorString);

// CPACOPER.C

extern int inIncrementStat(int* pinMember);
extern void vdSetPCTCommIndex(VS_BOOL type);
extern char* szGetCardLabel(void);
extern void vdSetNextLineEntry(void);
extern VS_BOOL fGetExpDtReqd(void);
extern VS_BOOL fGetManEntry(void);
extern VS_BOOL fGetManEntryPasswd(void);
extern void vdClearStatusMessage(void);
extern int inGetRowLim(void);
extern short inGetIdleTimeOut(void);
extern void vdClrNextLineEntry(void);
extern void vdGetCSTCurSymbol(char*);
extern int inGetAmount(char* szAmount,VS_BOOL fAskForCurrency,long lnMin,long lnMax,char* szDisplaySymbol);
extern VS_BOOL fGetTaxProc(void);
extern int inGetTCTTaxPercent(void);
extern int inComputePercent(long lnPercent,char* szCalcAmt,long lnBaseAmt,int inFractionalSize);
extern short inGetTipPercent(void);
extern int inGetCheckMID(TRANSACTION_OBJECT* pobTran);
extern int inGetOTInvBatchRec(TRANSACTION_OBJECT* pobTran,int inKey,long lnDBWhat);
extern int inGetTCTKeyInvNum(void);
extern void vdSetInvNum(long);
extern int inRunFunction(TRANSACTION_OBJECT* pobTran,int inFieldID);
extern int inConfRecEdit(char* pchDataFileName);
extern int inGetDCInvBatchRec(TRANSACTION_OBJECT* pobTran,int inKey,long lnDBWhat);
extern int inLoadHostData(int inHostRecNo);
extern short inGetCurrencyIdx(void);
extern int inGetTCTInvNumSize(void);
extern int inDeleteAllBatches(TRANSACTION_OBJECT* pobTran);
extern int inLoadCSTRec(int inCSTRecNumber);
extern int inGetOTKeyBatchRec(TRANSACTION_OBJECT* pobTran,int inKey,BATCH_KEY* psrBatchKey,long lnDBWhat);
extern int inGetDCKeyBatchRec(TRANSACTION_OBJECT* pobTran,int inKey,BATCH_KEY* psrBatchKey,long lnDBWhat);
extern int inCheckForDuplicate(TRANSACTION_OBJECT* pobTran);
extern void vdFlushCardBuffer(void);
extern VS_BOOL fOpenTabEmpty(TRANSACTION_OBJECT* pobTran);
extern VS_BOOL fReversalsEmpty(void);
extern void vdCloseTabBatch(TRANSACTION_OBJECT* pobTran);
extern int inClrBatch(TRANSACTION_OBJECT* pobTran,int inClearType,VS_BOOL fDisplayFlag);
extern int inLoadMITRec(int);
extern int inDeleteOpenTabBatch(TRANSACTION_OBJECT* pobTran);
extern void vdGetCardParseError(long lnErrNum);
extern int inCheckTrackOneData(struct TRACK* psrCardData,int inResult);
extern int inCheckTrackTwoData(struct TRACK* psrCardData,int inResult);

// CPACPRNT.C

extern VS_BOOL fGetTCTSugTipOn(void);
extern int inGetTCTSugTip1(void);
extern int inGetTCTSugTip2(void);
extern int inGetTCTSugTip3(void);
extern VS_BOOL fGetTCTOpenTabOptRec(void);
extern int inGetReport1Template(void);
extern int inSelectOneAllMID(TRANSACTION_OBJECT* pobTran,VS_BOOL fPromptMerchFlag);
extern int inGetMITTotRecs(void);
extern short inGetMerchantNum(void);
extern int inGetDCBatchRecCnt(TRANSACTION_OBJECT* pobTran);
extern void vdCloseDCBatch(TRANSACTION_OBJECT* pobTran);
extern int inGetCSTTotRecs(void);
extern int inGetDCKeyBatchRec(TRANSACTION_OBJECT* pobTran,int inKey,BATCH_KEY* psrBatchKey,long lnDBWhat);
extern VS_BOOL fGetCashBack(void);
extern int inLoadTRTRec(TRANSACTION_OBJECT* pobTran,int inTranCode);
extern void vdSetCDTHostIndex(int);
extern VS_BOOL fGetTaxProc(void);
extern int inGetTCTSurCharge(void);
extern short inGetAVS(void);
extern VS_BOOL fGetCardPresent(void);
extern VS_BOOL fGetOpenTabSLine(void);
extern VS_BOOL fGetSignLine(void);
extern VS_BOOL fGetPrintBatNum(void);
extern VS_BOOL fGetPrePrint(void);
extern VS_BOOL fGetPrintDisclaimer(void);
extern int inGetCDTIssuerNum(void);
extern VS_BOOL fCustomerReceipt(TRANSACTION_OBJECT* pobTran);
extern int   inAddExternalPfrData(unsigned int uiFieldId,unsigned char * pchFieldData,int inDataSize);
extern VS_BOOL fGetTCTCloseTabOptRec(void);

// CPACCBT.C

extern short inGetBatchIndex(void);

// CUSTOPER.C

extern short inGetOpenTabDAmt(void);
extern void vdComputeTransactionTotal(char* szAmt,TRANSACTION_OBJECT* pobTran);
extern VS_BOOL fAmountLessThanFloorLimit(TRANSACTION_OBJECT* pobTran);
extern char* szGetHDTAmountFormat(void);
extern void vdFlushKeyboardBuffer(void);

//CPACSTL.C

extern int inRunOperation(TRANSACTION_OBJECT* pobTran,int inOperation);


#endif /* CPACEXTN_H */


